<?php
class modODudecardMenuHelper
{
    /**
     * Retrieves the hello message
     *
     * @param array $params An object containing the module parameters
     * @access public
     */    
    function getCategory( $params )
    {
        $db =& JFactory::getDBO();
		//$query = "select name,cat from #__ecard_cate where subcat='0' order by cat";
		$query = "SELECT id AS value, category_kategorien_name AS text FROM #__rwcards_category order by category_kategorien_name, ordering";
		$db->setQuery($query);
		$rows = $db -> loadObjectList();

		
		return $rows;
		//for( $i=0; $i<count($rows); $i++ )
		//{
		//	$row = $rows[$i];
			//return "<li><a href=index.php?option=com_navneet&cate=".$row->cat.">".$row->name."</a></li>";
			
		
		//} 
			
		
		//return 'hi, '.$params;
    }
	function getSub($params)
	{
	 		$db =& JFactory::getDBO();
			$query = "select name,banner,bg,cat from #__ecard_cate where subcat='".$params."'";
			$db->setQuery($query);
			$rows = $db -> loadObjectList();
			return $rows;
	}
	
}


?>